A current trend in computer technology is that computer systems are equipped with parallel processing capabilities, such as multiple processor cores. Further, applications are moved to the Internet, e.g., as web applications. In a way, web applications may be regarded as a multi-system platform for new applications, because they allow for executing applications in various kinds of web browsers, which in turn may run on various kinds of computing systems.
The usage of parallel processing capabilities however raises several issues. In particular, efficient utilization of parallel processing capabilities may require specifically designed program code, and significant effort may be required to provide such “parallelized” program code. Exemplary issues which may arise when developing parallelized program code are decomposition of a problem into parallel parts, scaling of a problem with the available parallel processing capabilities (for example: “If the problem can be handled with a certain speed on four processor cores, will the performance double when eight processor cores are available?”), or debugging of the parallelized program code.
A known way of dealing with such issues in a transparent manner for program code developers is a concept referred to as “Thread-Level Speculation”. In the case of Thread-Level Speculation, a function which is called during execution of the program code is executed in a new thread, e.g., running on a separate processor core. If this execution of the function in the new thread causes a conflict, a rollback is performed and the function is then executed in an existing thread, typically the thread from which the function was called.
However, the need to be able to perform a rollback whenever a function is called may result in significant memory usage because the state of the system when starting execution of the function in the new thread needs to be stored.
Accordingly, there is a need for techniques which allow for efficiently executing program code in multiple threads.